import request from '@/utils/request'

//获取列表
export const indexApi = async (params) => {
    return await request.get({ 
        url: '/api/permission/index',
        params
    })
}

//新增行
export const addApi = async (data) => {
    return await request.post({ 
        url: '/api/permission/add',
        data
    })
}

//编辑行
export const editApi = async (data) => {
    return await request.post({ 
        url: '/api/permission/edit',
        data
    })
}

//列表删除
export const delApi = async (data) => {
    return await request.post({ 
        url: '/api/permission/del',
        data
    })
}

//更新行字段
export const updateFieldApi = async (data) => {
    return await request.post({ 
        url: '/api/permission/edit?update=field',
        data
    })
}